package com.example.OnlineStorage.service.ShareFiles;

import com.example.OnlineStorage.pojo.entity.ShareFiles;
import lombok.SneakyThrows;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;
import java.util.Set;

@Service
public interface ShareFilesService {

    String createShareFiles(String name, String UUID);

    String createDirectory(Long shareFilesId, String fromPath, String name, String UUID);

    Map<String, Object> isExist(Long shareFilesId, String fromPath, String name, String intactSHA256, List<String> AllChunkSHA256, String UUID);

    Map<String, Object> putChunk(Long shareFilesId,
                                 String fromPath,
                                 String name,
                                 String intactSHA256,
                                 String ChunkSHA256,
                                 List<String> AllChunkSHA256,
                                 MultipartFile ChunkFile,
                                 String UUID);

    String reviseName(Long shareFilesId,
                      String fromPath,
                      String newName,
                      String UUID);
    String deleteNode(Long shareFilesId,
                      String fromPath,
                      String UUID);

    Map<String, Object> deleteNodes(Long shareFilesId, List<String> fromPath, String UUID);

    String recoveryNode(Long shareFilesId, String fromPath, String cacheName, String UUID);

    String moveNode(Long shareFilesId, String fromPath, String toPath, String UUID);

    Set<Object> getCacheList(Long shareFilesId, String UUID);


    void addShareFile(Long userId, Long shareFileId, Long permission, String UUID);
}
